﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;

using Warehouse.Common.Entities;

namespace Warehouse.DataAccess
{
    public interface IUserDA
    {
        //C
        User Create();
        //U
        int Add(User toUpdate, out int newID);
        int Update(User toUpdate);
        //D
        int Delete(int id);
        int Delete(Expression<Func<User, bool>> where);
        //R
        User GetByID(int id);
        User GetByCode(string code);
        IEnumerable<User> GetList(Expression<Func<User, bool>> where);
    }
}
